//
//  NewsTableViewCell.m
//  UI10-TableViewCellSelf_Size
//
//  Created by dllo on 16/7/27.
//  Copyright © 2016年 DM.C. All rights reserved.
//

#import "NewsTableViewCell.h"
#import "UIView+Frame.h"
@interface NewsTableViewCell ()
@property (nonatomic, strong) UILabel *newsLabel;
@end

@implementation NewsTableViewCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        _newsLabel = [[UILabel alloc] initWithFrame:CGRectZero];
        [self.contentView addSubview:_newsLabel];
        _newsLabel.numberOfLines = 0;
    }
    return self;
}
- (void)layoutSubviews {
    [super layoutSubviews];
    NSLog(@"contenView = %lf", self.contentView.dm_height);
    NSLog(@"self = %lf", self.dm_height);
    _newsLabel.frame = CGRectMake(0, 0, self.contentView.dm_width, self.dm_height);
    
}
- (void)setString:(NSString *)string {
    _string = [string copy];
    _newsLabel.text = _string;
}
@end
